package com.powernode.service;

import com.powernode.dao.DailyReportMapper;
import com.powernode.pojo.DailyReport;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @Author: ycc
 * @Date: 2021/9/15 13:02
 */

@Service
public class DailyReportService {
    @Resource
    DailyReportMapper dailyReportMapper;

    public DailyReport getById(Integer id){
        return dailyReportMapper.selectById(id);
    }

    //删除
    public void delete(Integer[] ids){
        dailyReportMapper.deletes(ids);
    }

    public DailyReport get(Integer id){
        return dailyReportMapper.selectById(id);
    }

    public int count(Map<String, Object> param) {
        return dailyReportMapper.count(param);
    }

    public List<DailyReport> getPageResult(Map<String, Object> param) {
        return dailyReportMapper.selectPageResult(param);
    }


    public void updateTodayReport(DailyReport dailyReport) {
        dailyReportMapper.updateTodayReport(dailyReport);
    }


    public DailyReport selectReportToday(String studentNumber){
        return dailyReportMapper.selectReportToday(studentNumber);
    }

}
